package com.liuyang.concurrency.chapter3;

public class Test {
    private static int counter = 0;

    public static void main(String[] args) {
        Thread t1 = new Thread(null,() ->{
            try {
                add(0);
            }catch (Error e){
                e.printStackTrace();
                System.out.println(counter);
            }
        },"thrad",1<<24);
        t1.start();

    }
    public static void add(int i){
        ++counter;
        add(i);
    }
}
